﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using System.Text.Json.Serialization;
using System.Threading.Tasks;

namespace Zocono.WCS.Infrastructure.ApllicationDto.DtoWcsManage
{
    #region query
    public class QueryPlcConnectionLockInfoDto
    {
        public long? PlcConnectionID { get; set; }
        public string ProgrameCode { get; set; }
        public string JobName { get; set; }
        public bool? IsLock { get; set; }
    }

    public class QueryPlcConnectionStateInfoDto
    {
        public long? PlcConnectionID { get; set; }
        public string ProgrameCode { get; set; }
        public bool? Connected { get; set; }
        
    }
    #endregion

    /// <summary>
    /// plc连接锁定信息
    /// </summary>
    public class PlcConnectionLockInfoDto 
    {
        public long ID { get; set; }
        /// <summary>
        /// plc连接关联Id
        /// </summary>
        public long PlcConnectionID { get; set; }
        /// <summary>
        /// 进程编号
        /// </summary>
        public string ProgrameCode { get; set; }
        /// <summary>
        /// 任务名称
        /// </summary>
        public string JobName { get; set; }
        /// <summary>
        /// 是否锁定
        /// </summary>
        public bool IsLock { get; set; }
        /// <summary>
        /// 更新时间
        /// </summary>
        public DateTime UpdateTime { get; set; }
        /// <summary>
        /// plc ip
        /// </summary>
        [Required(AllowEmptyStrings = true)]
        public string PlcConnectionIP { get; set; }
        /// <summary>
        /// plc cpu
        /// </summary>
        [Required(AllowEmptyStrings = true)]
        public string PlcCpuType { get; set; }

    }

    /// <summary>
    /// plc连接状态信息
    /// </summary>
    public class PlcConnectionStateInfoDto
    {
        public long ID { get; set; }
        /// <summary>
        /// plc连接关联Id
        /// </summary>
        public long PlcConnectionID { get; set; }
        /// <summary>
        /// 进程编号
        /// </summary>
        public string ProgrameCode { get; set; }
        /// <summary>
        /// 连接状态
        /// </summary>
        public bool Connected { get; set; }
        public DateTime UpdateTime { get; set; }
        /// <summary>
        /// plc ip
        /// </summary>
        [Required(AllowEmptyStrings = true)]
        public string PlcConnectionIP { get; set; }
        /// <summary>
        /// plc cpu
        /// </summary>
        [Required(AllowEmptyStrings = true)]
        public string PlcCpuType { get; set; }
    }

}
